package org.dev.as.project.common.ui.component;

import android.app.Application;

import org.dev.as.project.common.flutter.HiFlutterCacheManager;
import org.dev.hi.library.log.HiConsolePrinter;
import org.dev.hi.library.log.HiLogConfig;
import org.dev.hi.library.log.HiLogManager;

public
/**
 * Author WenPing 
 * CreateTime 2021/3/23.
 * Description:
 */
class HiBaseApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        initLog();
        HiFlutterCacheManager.getInstance().preLoad(this);

    }

    private void initLog() {
        HiLogManager.init(new HiLogConfig() {
            @Override
            public JsonParser injectJsonParser() {
                return super.injectJsonParser();
            }

            @Override
            public boolean enable() {
                return true;
            }
        }, new HiConsolePrinter());
    }
}
